package com.easygo.common;

/**
 * 601:请求成功
 * 701:请求失败
 * 702:未登录
 * 703:权限不足
 * 704:请求参数错误
 * 705:
 */
public enum ResultEnum {
    //login.html
    SUCCESS(200,"请求成功"),
    FAIL(201,"请求失败"),
    CTLOGIN(202,"账号被禁用"),


    INSERT_SUCCESS(601,"添加成功"),
    DELETE_SUCCESS(602,"删除成功"),
    UPDATE_SUCCESS(603,"修改成功"),
    SELECT_SUCCESS(604,"查询成功"),
    INSERT_FAIL(701,"添加失败"),
    DELETE_FAIL(702,"删除失败"),
    UPDATE_FAIL(703,"修改失败"),
    SELECT_FAIL(704,"查询失败"),

    SEND_EMAIL_SUCCESS(801,"邮件发送成功"),
    SEND_EMAIL_FAIL(901,"邮件发送失败"),
    ;

    private int code;

    private String message;

    ResultEnum(int code,String message){
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
